package vy.org.app.page.lookup.cities;

import org.vy.dal.dao.lookup.VyLookupCitiesDO;

public class MntnCitiesAssembler {

	private static MntnCitiesAssembler assembler = new MntnCitiesAssembler();

	public static MntnCitiesAssembler getAssembler() {
		return assembler;
	}

	public VyLookupCitiesDO getCities(MntnCitiesForm form) {

		VyLookupCitiesDO dto = new VyLookupCitiesDO();
		if (form.getCityCode() != null && !"".equals(form.getCityCode().trim())) {

			dto.setCityCode(form.getCityCode());
		}
		if (form.getCityName() != null && !"".equals(form.getCityName().trim())) {

			dto.setCityName(form.getCityName());
		}
		if (form.getStateCode() != null
				&& !"".equals(form.getStateCode().trim())) {

			dto.setStateCode(form.getStateCode());
		}
		if (form.getStateName() != null
				&& !"".equals(form.getStateName().trim())) {

			dto.setStateName(form.getStateName());
		}
		if (form.getCountryCode() != null
				&& !"".equals(form.getCountryCode().trim())) {

			dto.setCountryCode(form.getCountryCode());
		}
		if (form.getCountryName() != null
				&& !"".equals(form.getCountryName().trim())) {

			dto.setCountryName(form.getCountryName());
		}
		return dto;

	}

}
